package cn.billho.popcache.annotation;

import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR})
@Repeatable(CacheClear.List.class)
public @interface CacheClear {

    /**
     * 缓存集合
     *
     */
    String region() default "";

    /**
     * 缓存key
     *
     */
    String key() default "";

    @Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR})
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    public @interface List {
        CacheClear[] value();
    }
}
